package com.gopay.common.oldmermove.dao.impl;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.gopay.common.base.dao.impl.BaseDAOImpl;
import com.gopay.common.constants.oldmermove.OldMerIdentityCodeStatus;
import com.gopay.common.domain.oldmermove.OldMovedMerIdentityCode;
import com.gopay.common.oldmermove.dao.OldMovedMerIdentityCodeDAO;

/**
 * 旧平台商户识别码DAO实现
 * 
 * @OldMovedMerIdentityCodeDAOImpl.java
 * @author zhangjunyu
 * @2014-10-21 下午4:53:24 www.gopay.com.cn Inc.All rights reserved.
 */
@Repository("oldMovedMerIdentityCodeDAO")
public class OldMovedMerIdentityCodeDAOImpl extends BaseDAOImpl<OldMovedMerIdentityCode, Serializable> implements
		OldMovedMerIdentityCodeDAO {

	/**
	 * 根据olderMerId更新OldMovedMerIdentityCode对象为已同步状态
	 */
	@Override
	public void updateIdentityCodeSync(String newMerId) {
		String hql = "update OldMovedMerIdentityCode set status =:status where newMerId =:newMerId";
		Map<String, Object> param = new HashMap<String, Object>();
		param.put("status", OldMerIdentityCodeStatus.SYNC);
		param.put("newMerId", newMerId);
		this.updateByHql(hql, param);
	}

}
